from flask import Flask
from flask_sqlalchemy import SQLAlchemy

from config import Config

app = Flask(__name__)

# 配置
app.config.from_object(Config)
# 配置数据库
db = SQLAlchemy(app)

db.init_app(app)


# 注册蓝图
from cyds.modules.index import index_blu
app.register_blueprint(index_blu)

from cyds.modules.news import news_blu
app.register_blueprint(news_blu)

from cyds.modules.admin import admin_blu
app.register_blueprint(admin_blu)

from cyds.modules.works import works_blu
app.register_blueprint(works_blu)


